<template>
  <div></div>
</template>

<script>
export default {
  data: () => ({
    loading: null,
  }),
  methods: {
    start() { // nuxt加载中会自动调用
      this.loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
    },
    finish() { // nuxt加载完成会自动调用
      setTimeout(() => {
        this.loading.close()
      }, 500);
    }
  }
}
</script>

<style>

</style>